/*
ID: icerupt1
PROG: barn1
LANG: C++11
*/
#include <fstream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;

const int maxn = 201;
bool cow[maxn];
int m, s, c;

int main()
{
	ifstream fin {"barn1.in" };
	ofstream fout{"barn1.out"};

	fin >> m >> s >> c;
	for (int i = 0; i < c; i++) {
		int t;
		fin >> t;
		cow[t-1] = true;
	}

	priority_queue<int, vector<int>, greater<int>> q;
	int num = 0;
	int cost = 0;
	for (int i = 0; i < s;) {
		if (cow[i]) {
			for (; i < s && cow[i]; i++) cost++;
			num++;
		} else {
			int  tmp = 0, first_last = false;
			if (!i) first_last = true;
			for (; i < s && !cow[i]; i++) tmp++;
			if (i == s) first_last = true;
			if (!first_last) q.push(tmp);
		}
	}
	while (num-- > m) { cost += q.top(); q.pop(); }
	fout << cost << "\n";
}
